import request from '@/config/axios'

export interface CmSipGatewayVO {
  id: number
  ipAddress: string
  status: number
}

// 查询网关配置即奥科、鼎信等列表
export const getCmSipGatewayPage = async (params) => {
  return await request.get({url: `/call/cm-sip-gateway/page`, params})
}

// 查询网关配置即奥科、鼎信等详情
export const getCmSipGateway = async (id: number) => {
  return await request.get({url: `/call/cm-sip-gateway/get?id=` + id})
}

// 新增网关配置即奥科、鼎信等
export const createCmSipGateway = async (data: CmSipGatewayVO) => {
  return await request.post({url: `/call/cm-sip-gateway/create`, data})
}

// 修改网关配置即奥科、鼎信等
export const updateCmSipGateway = async (data: CmSipGatewayVO) => {
  return await request.put({url: `/call/cm-sip-gateway/update`, data})
}

// 删除网关配置即奥科、鼎信等
export const deleteCmSipGateway = async (id: number) => {
  return await request.delete({url: `/call/cm-sip-gateway/delete?id=` + id})
}

// 导出网关配置即奥科、鼎信等 Excel
export const exportCmSipGateway = async (params) => {
  return await request.download({url: `/call/cm-sip-gateway/export-excel`, params})
}
